package iotwisp.school.user.qo;

import iotwisp.base.cqrs.BaseQO;
import iotwisp.base.orm.query.QueryCondition;
import iotwisp.base.orm.query.QueryConditionType;
import iotwisp.base.orm.query.QueryConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;

@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@QueryConfig(daoBeanId = "adminService")
public class AdminQO extends BaseQO<String> {

	@QueryCondition(name = "name", ifTrueUseLike = "nameLike", type = QueryConditionType.LIKE_ANYWHERE)
	private String name;

	private Boolean nameLike = false;

	@QueryCondition(name = "phone", ifTrueUseLike = "phoneLike", type = QueryConditionType.LIKE_ANYWHERE)
	private String phone;

	private Boolean phoneLike = false;

	@QueryCondition(name = "loginName", ifTrueUseLike = "loginNameLike", type = QueryConditionType.LIKE_ANYWHERE)
	private String loginName;

	private Boolean loginNameLike = false;

	@QueryCondition(name = "enable")
	private Boolean enable;

	@QueryCondition(name = "roleSet", type = QueryConditionType.FETCH_EAGER)
	private Boolean fetchRoles = false;

	@QueryCondition(name = "headImage", type = QueryConditionType.FETCH_EAGER)
	private boolean fetchHeadImage;

}